package io.renren.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 学生作业
 *
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2021-10-19 15:04:20
 */
@Data
@TableName("jx_student_homwork")
public class JxStudentHomworkEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    private Long id;
    /**
     * 学生id
     */
    @NotNull(message = "请填写学生id", groups = {AddGroup.class, UpdateGroup.class})
    private Long studentId;
    /**
     * 作业上传地址
     */
    @NotBlank(message = "请填写学生id", groups = {AddGroup.class, UpdateGroup.class})
    private String fileUrl;
    /**
     * 针对课程
     */
    @NotNull(message = "请填写课程id", groups = {AddGroup.class, UpdateGroup.class})
    private Long courseId;
    /**
     * 作业名称
     */
    @NotBlank(message = "请填写作业名称", groups = {AddGroup.class, UpdateGroup.class})
    private String name;
    /**
     * 接收教师
     */
    @NotNull(message = "请填写学生id", groups = {AddGroup.class, UpdateGroup.class})
    private Long teacherId;
    /**
     * 提交时间
     */
    private Date uploadTime;
    /**
     * 授课时间
     */
    private String courseDay;
    /**
     * 使用设备
     */
    private Long deviceId;
    @TableField(exist = false)
    private String studentName;
    @TableField(exist = false)
    private String courseName;
    @TableField(exist = false)
    private String teacherName;
    @TableField(exist = false)
    private String deviceName;

}
